﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net.Mail;
using System.Text;
using System.Web;

namespace SelfMadeMillionaire.Core
{
	public static class MailSender
	{
		//public static bool Send(string emailTo, string subject, string body)
		//{
		//	return SendEmail(emailTo, subject, body);
		//}

		//public static bool SendContactMessage(string adminEmail, string userEmail, string firstName, string lastName, string phone, string message)
		//{
		//	string body = string.Format("First Name: {0}<br /> Last Name: {1}<br /> Email: {2}<br /> Phone: {3}<br /> Message: {4}", firstName, lastName, userEmail, phone, message);
			
		//	return SendEmail(adminEmail, "Request from Contact page", body);
		//}

		/*private static bool SendEmail(string email, string subject, string body)
		{
			try
			{
				var msg = GetMailMessage(email, subject, body);
				var client = new SmtpClient();
				client.Send(msg);

				return true;
			}
			catch (Exception ex)
			{
				new LoggingUtility().WriteErrorToLog(ex);
				return false;
			}
		}*/

		/*private static MailMessage GetMailMessage(string email, string subject, string body)
		{
			var msg = new MailMessage();
			msg.IsBodyHtml = true;
			//msg.From = new MailAddress(from);
			msg.To.Add(email);

			msg.Body = body;
			msg.Subject = subject;

			return msg;
		}*/
	}
}
